import React, { memo, useEffect, useRef } from 'react'
import Router from '@/router/index'
import { useRoutes } from 'react-router-dom'
import ContentWarrper from './style'
const index = memo(() => {
  const main = useRef();
  useEffect(()=>{
    
    main.current.scrollTop = 0
  })
  return (
    <ContentWarrper ref={main}>
      {useRoutes(Router)}
    </ContentWarrper>
  )
})

export default index